import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import Vant from 'vant'
import 'vant/lib/index.css'
import "normalize.css";
import './assets/css/global.scss'
import i18n from './locale'
// import { Locale } from 'vant'
// import enUS from 'vant/es/locale/lang/en-US';
import request from './common/request'
import { getDict,formatMoney,myfixedNum,formatDecimal,formatDate} from './common/comApi'
//复制链接的插件引入和使用
import VueClipboard from 'vue-clipboard2'
import { Sticky,Toast,Lazyload } from 'vant';
//密码加密
import md5 from 'js-md5';
Vue.prototype.$md5 = md5;

router.afterEach(() => {
  window.scrollTo(0,0);
});
Vue.use(Vant)
Vue.use(Toast);

Vue.use(Sticky);
Vue.use(Lazyload);

Vue.use(VueClipboard);
Vue.config.productionTip = false
// Toast.setDefaultOptions({ duration: 1000 });

Vue.prototype.$http = request
Vue.prototype.$getDict = getDict
Vue.prototype.$formatMoney = formatMoney
Vue.prototype.$myfixedNum = myfixedNum
Vue.prototype.$formatDecimal = formatDecimal
Vue.prototype.$formatDate = formatDate



export default new Vue({
  i18n,
  router,
  store,
  Toast,
  render: h => h(App)
}).$mount('#app')
